#define	_SYSTIMER_GLOBAL_
#include "config.h"

void SysTickDeInit(void)
{
	SysTick->CTRL = 0;
}

void SysTickInit(void)
{
	tickCount = 0;
	/* Setup SysTick Timer for 1 msec interrupts	*/
	if (SysTick_Config(SystemFrequency / 1000))
	{ 
		/* Capture error */ 
		while (1);
	}
}

uint32 GetTickCount(void)
{
	return tickCount;
}

void DelayTimer(uint32 para)
{
	U32 innerTime = GetTickCount();
	while (GetTickCount() - innerTime <= para)
	{
		WDR();
	}
}

